<?php

namespace common\models\Art;

use Yii;

/**
 * This is the model class for table "art".
 *
 * @property integer $id
 * @property string $title
 * @property string $subhead
 * @property string $intro
 * @property string $img
 * @property string $author
 * @property string $comefrom
 * @property string $link
 * @property string $content
 * @property string $seocontent
 * @property string $seokeyword
 * @property string $isrecom
 * @property integer $status
 * @property integer $created_at
 * @property integer $updated_at
 * @property string $category_id
 */
class Art extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'art';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['title', 'created_at', 'updated_at'], 'required'],
            [['intro', 'content'], 'string'],
            [['status', 'created_at', 'updated_at'], 'integer'],
            [['title', 'subhead', 'img', 'author', 'comefrom', 'link', 'seocontent', 'seokeyword', 'isrecom', 'category_id'], 'string', 'max' => 255],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'title' => Yii::t('app', 'Title'),
            'subhead' => Yii::t('app', 'Subhead'),
            'intro' => Yii::t('app', 'Intro'),
            'img' => Yii::t('app', 'Img'),
            'author' => Yii::t('app', 'Author'),
            'comefrom' => Yii::t('app', 'Comefrom'),
            'link' => Yii::t('app', 'Link'),
            'content' => Yii::t('app', 'Content'),
            'seocontent' => Yii::t('app', 'Seocontent'),
            'seokeyword' => Yii::t('app', 'Seokeyword'),
            'isrecom' => Yii::t('app', 'Isrecom'),
            'status' => Yii::t('app', 'Status'),
            'created_at' => Yii::t('app', 'Created At'),
            'updated_at' => Yii::t('app', 'Updated At'),
            'category_id' => Yii::t('app', 'Category ID'),
        ];
    }
}
